package nix.spring.aop;

import javax.annotation.Resource;

import nix.spring.service.UserService;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)// 自动创建容器
@ContextConfiguration("classpath:nix/spring/aop/applicationContext.xml")// 指定配置文件
public class Demo1 {

	@Resource(name="userService")
	private UserService us;
	
	@Test
	public void fun1() {

		us.add();
		System.out.println("======================");
		us.delete();
	}
}
